package com.ke.searchhouse.service;

import com.ke.searchhouse.dto.SubwayDTO;
import com.ke.searchhouse.dto.SubwayStationDTO;
import com.ke.searchhouse.dto.SupportAddressDTO;
import com.ke.searchhouse.entity.SupportAddress;
import com.ke.searchhouse.template.BaiduMapLocation;
import com.ke.searchhouse.util.ServiceMultiResult;
import com.ke.searchhouse.util.ServiceResult;

import java.util.List;
import java.util.Map;

/**
 * @author  keke
 * @create  2018/10/14 0014 下午 8:31
 * @desc
 **/
public interface IAddressService {

    ServiceMultiResult<SupportAddressDTO> finAllCities();

    /**
     * 根据城市英文简写获取该城市所有支持的区域信息
     * @param cityName
     * @return
     */
    ServiceMultiResult findAllRegionsByCityName(String cityName);

    /**
     * 获取该城市所有的地铁线路
     * @param cityEnName
     * @return
     */
    List<SubwayDTO> findAllSubwayByCity(String cityEnName);

    /**
     * 获取地铁线路所有的站点
     * @param subwayId
     * @return
     */
    List<SubwayStationDTO> findAllStationBySubway(Long subwayId);

    /**
     * 根据英文简写获取具体区域的信息
     * @param cityEnName
     * @param regionEnName
     * @return
     */
    Map<SupportAddress.Level, SupportAddressDTO> findCityAndRegion(String cityEnName, String regionEnName);

    ServiceResult<SubwayDTO> findSubway(Long subwayLineId);

    ServiceResult<SubwayStationDTO> findSubwayStation(Long subwayStationId);

    ServiceResult<SupportAddressDTO> findCity(String cityEnName);

    /**
     * 调用百度api接口查询具体经纬度
     * @param city 城市名
     * @param address 地址
     * @return
     */
    ServiceResult<BaiduMapLocation> getBaiduMapLocation(String city, String address);

    /**
     * 上传百度LBS数据
     */
    ServiceResult lbsUpload(BaiduMapLocation location, String title, String address, long houseId, int price, int area);

    /**
     * 移除lbs节点
     * @param houseId 房源id
     * @return
     */
    ServiceResult removeLbs(long houseId);


}
